package com.whq.service.weixin.factory;


import com.whq.service.SpringUtils;
import com.whq.service.weixin.EventsService;
import com.whq.service.weixin.impl.*;

public class WechatEventFactory {
	
	public static EventsService create(String event){

		if("subscribe".equalsIgnoreCase(event)){
			return SpringUtils.getBean(SubscribeEventsServiceImpl.class);
		}else if("unsubscribe".equalsIgnoreCase(event)){
			return SpringUtils.getBean(UnsubscribeEventsServiceImpl.class);
		}else if(event.equalsIgnoreCase("click")){
			return SpringUtils.getBean(ClickEventsServiceImpl.class);
		}else if(event.equalsIgnoreCase("LOCATION")){
			return SpringUtils.getBean(LocationEventsServiceImpl.class);
		}else if(event.equalsIgnoreCase("SCAN")){
			return SpringUtils.getBean(ScanEventsServiceImpl.class);
		}
		return null;
		
	}

}
